#!/usr/bin/env bash
f_fail(){ echo -e "\033[31m[FAIL]\033[0m ${1}" >&2; exit 1; }
f_done(){ echo -e "\033[32m[DONE]\033[0m ${1}";  exit; }

[[ -z "${2}" ]] && f_fail 'usage: ./create.sh {fileName} {userName}';
htpasswd -c "/home/www/conf/auth/${1}.htpasswd" "${2}";
